package edu.whu.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import edu.whu.bean.Product;
import edu.whu.bean.Supplier;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

@Mapper
public interface ProductMapper extends BaseMapper<Product> {

    @Select("select s.id,s.name,s.product_id from t_pro p,t_supplier s where p.id=s.product_id and s.product_id = #{id}")
    List<Supplier> selectSuppliers(int id);

}
